// services/course.js 课程接口模块（新建）
import request from '@/utils/request'
// 分页查询课程信息
export const getQueryCourses = data => {
  return request({
    method: 'POST',
    url: '/boss/course/getQueryCourses',
    data
  })
}

// 课程上下架接口
export const changeState = params => {
  return request({
    method: 'GET',
    url: '/boss/course/changeState',
    params: params
  })
}

// 保存或更改课程信息接口
export const saveOrUpdateCourse = data => {
  return request({
    method: 'POST',
    url: '/boss/course/saveOrUpdateCourse',
    data
  })
}

// 上传图片接口
export const uploadCourseImage = data => {
  // data 应当为ForData
  return request({
    method: 'POST',
    url: '/boss/course/upload',
    data
  })
}
